package com.gz.university.crm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.gz.university.crm.dao.ISysMenuDao;
import com.gz.university.crm.entity.SysMenu;
import com.gz.university.crm.entity.SysMenuPrivilege;
import com.gz.university.crm.service.ISysMenuService;

@Service(value = ISysMenuService.SERVICE_NAME)
@Transactional(readOnly = true)
public class SysMenuServiceImpl implements ISysMenuService {
	private ISysMenuDao sysMenuDao;

	public ISysMenuDao getSysMenuDao() {
		return sysMenuDao;
	}
    @Resource(name=ISysMenuDao.DAO_NAME)
	public void setSysMenuDao(ISysMenuDao sysMenuDao) {
		this.sysMenuDao = sysMenuDao;
	}
	@Override
	public List<SysMenu> findAllSysMenus() {
		// TODO Auto-generated method stub
		final String hql="from SysMenu s order by s.sort asc";
		return this.sysMenuDao.find(hql);
	}
	@Transactional(isolation=Isolation.DEFAULT,propagation=Propagation.REQUIRED,readOnly=false)
	@Override
	public void updateSysMenus(Integer roleId, String[] menuModules) {
		// TODO Auto-generated method stub
	
	}

}
